<?php

class ProfileBox extends AbstractBox {
	protected $template = 'user/profile.tpl';
	
	protected function setup() {
		$loggedUser = LoggedUser::whoIsLogged();
		if (!$loggedUser) {
			Utils::redirect('uvod.html');
		} else {
			$userRepository = new UserRepository();
			$userRepository->setAdditionalWhere(array(array('column' => 'deleted', 'value' => 0, 'xxx' => '=')));
			$user = $userRepository->getOneByUsername(addslashes($_GET['alias']));
			MySmarty::assign('user', $user);
		}
	}
}

?>